home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / netprog.zip / NETPROG.TAR / inettime / systype.h < prev    next >
C/C++ Source or Header  |  1989-12-17  |  2KB  |  85 lines

  1. /*
  2.  * Figure out the type of system that we're running on.
  3.  *
  4.  * Try to determine the environment automatically from the C compiler's
  5.  * predefined symbols.
  6.  * The following can be determined automatically:
  7.  * BSD VAX, Pyramid, Xenix, AT&T 3b1, AT&T 80386, Celerity and MS-DOS.
  8.  * If this doesn't work on some new system, ifdef this out, and set it
  9.  * by hand.
  10.  */
  11.  
  12. #ifdef    unix        /* true for most UNIX systems, BSD and Sys5 */
  13.             /* but not for Xenix !! */
  14. #define    UNIX    1    /* OS type */
  15.  
  16. #ifdef    vax        /* true for BSD on a VAX */
  17. /* also true for VAX Sys5, but we don't have to worry about that (for now) */
  18. #define    VAX    1    /* hardware */
  19. #define    BSD    1    /* OS type */
  20. #else
  21. #ifdef    pyr
  22.  
  23. #define    PYRAMID    1    /* hardware */
  24. #define    BSD    1    /* OS type */
  25. #else
  26. #ifdef    mc68k        /* assume AT&T UNIX pc, aka 7300 or 3b1 */
  27.             /* what about other 68000 unix systems ?? */
  28. #define    UNIXPC    1    /* hardware */
  29. #define    SYS5    1    /* OS type */
  30. #else
  31. #ifdef    i386        /* AT&T System V Release 3.2 on the Intel 80386 */
  32.  
  33. #define    IBMPC     1    /* hardware */
  34. #define    SYS5     1    /* OS type */
  35. #else
  36. #ifdef    accel
  37.  
  38. #define    CELERITY 1    /* hardware */
  39. #define    BSD     1    /* OS type */
  40. #else
  41. what type of unix system is this
  42. #endif    /* accel */
  43. #endif    /* i386 */
  44. #endif    /* mc68k */
  45. #endif    /* pyr */
  46. #endif    /* vax */
  47.  
  48. #endif    /* unix */
  49.  
  50. #ifdef    M_XENIX        /* true for SCO Xenix */
  51. #define    UNIX    1    /* OS type */
  52. #define    XENIX    1    /* OS type */
  53. #define    SYS5    1    /* OS type */
  54. #define    IBMPC    1    /* hardware */
  55. #endif    /* M_XENIX */
  56.  
  57. #ifdef    MSDOS        /* true for Microsoft C and Lattice, assume former */
  58. #define    IBMPC        1    /* hardware */
  59. #define    MICROSOFT    1    /* C compiler type */
  60. #endif    /* MSDOS */
  61.  
  62. /*
  63.  * Define replacement names for the BSD names that we use.
  64.  */
  65.  
  66. #ifdef    SYS5
  67. #define    rindex        strrchr
  68. #define    index        strchr
  69.  
  70. #define    u_char        unchar
  71. #define    u_short        ushort
  72. #define    u_int        uint
  73. #define    u_long        ulong
  74. #endif
  75.  
  76. #ifdef    MICROSOFT
  77. #define    rindex        strrchr
  78. #define    index        strchr
  79.  
  80. #define    u_char        unchar
  81. #define    u_short        ushort
  82. #define    u_int        uint
  83. #define    u_long        ulong
  84. #endif
  85.